import React from 'react'
import { Tabs } from 'antd-mobile'
import { withRouter } from "react-router-dom";

function Cate(props) {
    let {cates}=props
    return (
        <div>
            <Tabs onChange={key=>{props.history.push("/lists/"+key)}}>
                {cates.map(item=>{
                    return <Tabs.Tab title={item.catename} key={item.id}>
                           </Tabs.Tab>
                })}
            </Tabs>
        </div>
    )
}

export default withRouter(React.memo(Cate))